package model

import (
	"gorm.io/gorm"
	"time"
)

// ID 自增ID主键
type ID struct {
	ID int64 `json:"id" gorm:"primaryKey; column:id; comment:主键id"`
}

// Timestamps 创建、更新时间
type Timestamps struct {
	CreatedAt time.Time `json:"created_at" gorm:"column:created_at; default:NOW(); comment:创建时间"`
	UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at; default:null; comment:更新时间"`
}

// SoftDeletes 软删除
type SoftDeletes struct {
	DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"column:deleted_at; comment:删除时间"`
}

// UsedAt 使用时间
type UsedAt struct {
	UsedAt time.Time `json:"used_at" gorm:"column:used_at; default:null; comment:使用时间"`
}
